import request from '@/utils/request'
import {encryptedData} from '@/utils/encrypt'
import {loginRSA, tokenName} from '@/config'

export async function getList(data) {
  return request({
    url: `/information/list?pageSize=${data.pageSize}&pageNum=${data.pageNum}&typeId=${data.typeId}&title=${data.title}&maName=${data.maName}&stateId=${data.stateId}`,
    method: 'get',
  })
}
export async function setTop(data) {
  data.top=String(data.top)
  return request({
    url: `/information/top`,
    method: 'put',
    data: {...data}
  })
}

export async function addInfo(data) {
  return request({
    url: `/information/add`,
    method: 'post',
    data: {...data}
  })
}

export async function upDate(data) {
  return request({
    url: `/information/update`,
    method: 'put',
    data: {...data}
  })
}
export async function deleteInfo(data) {
  return request({
    url: `/information/delete`,
    method: 'delete',
    data: {...data}
  })
}


export async function getColumn() {
  return request({
    url: `/infoType/select`,
    method: 'get',
  })
}
